package com.kfm.base.string;

public class Exer05 {

    public static void main(String[] args) {
        int num = 53;
        String label = label(num);
        System.out.println(label);
    }

    private static String binary(int num) {
        StringBuilder result = new StringBuilder();

        while (num != 0) {
            result.append(num % 2);
            num /= 2;
        }
        return result.reverse().toString();
    }

    private static String label(int num) {
        if (num == 0){
            return "";
        }

        StringBuilder result = new StringBuilder();

        while (num != 0) {
            // 第 1 个，下标 0
            num -= 1;
            result.append((char) (65 + num % 26));
            num /= 26;
        }
        return result.reverse().toString();
    }


}
